<include file="Layout/header" />
<body>
<div class="breadcrumbs" id="breadcrumbs"> 
  <script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>
  <ul class="breadcrumb">
    <li> <i class="icon-home home-icon"></i> <a href="{:U('Admin/Index/welcome')}">首页</a> </li>
    <li class="active">赛事管理</li>
  </ul>
</div>
<div class="page-content">
  <div class="page-header">
    <h1> 体育赛事 <small> <i class="icon-double-angle-right"></i> 赛事管理 </small> </h1>
  </div>
  <div class="">
    <div class="tabbable">
      <ul class="nav nav-tabs" id="myTab">
      
          <li>
           
             <a class="btn btn-primary" href="{:U('Admin/Sport/match')}">赛事管理</a>
           
          
        
           
          </li>
          <li>
           
             <a class="btn btn-info" href="{:U('Admin/Lottryodds/open_time',array('c_id'=>$key))}">订单</a>
           
          
        
           
          </li>
	
		
      </ul>
   </div>
  </div>
  <!-- /.table-responsive --> 
</div>

</div>
</div>
<include file="Layout/js"/> 
<script src="__ADMIN_JS__/bootbox.js"></script>
<link rel="stylesheet" href="__ADMIN_JS__/wan-spinner/wan-spinner.css" />
  
<script type="text/javascript">
function OpeSeconds(type)
{
  var seconds = $("#seconds").val();
  var nums = $("#nums").val();
  
  switch (type)
  {
    case 1:
      for (var i = 1; i <= nums; i++)
      {
        //开盘-
        var oldkptime = $("#kaipan_" + i).val();
        var oldkpdate = new Date("2012/01/01 " + oldkptime);
        var newkptime = oldkpdate.getTime() - seconds * 1000;
        var newkpdate = new Date(newkptime);
        $("#kaipan_" + i).val(TimeFormat(newkpdate));
        
        //封盘-
        var oldfptime = $("#fengpan_" + i).val();
        var oldfpdate = new Date("2012/01/01 " + oldfptime);
        var newfptime = oldfpdate.getTime() - seconds * 1000;
        var newfpdate = new Date(newfptime);
        $("#fengpan_" + i).val(TimeFormat(newfpdate));
        
        //开奖-
        var oldkjtime = $("#kaijiang_" + i).val();
        var oldkjdate = new Date("2012/01/01 " + oldkjtime);
        var newkjtime = oldkjdate.getTime() - seconds * 1000;
        var newkjdate = new Date(newkjtime);
        $("#kaijiang_" + i).val(TimeFormat(newkjdate));
      }
      break;
    case 2:
      for (var i = 1; i <= nums; i++)
      {
        //开盘+
        var oldkptime = $("#kaipan_" + i).val();
        var oldkpdate = new Date("2012/01/01 " + oldkptime);
        var newkptime = oldkpdate.getTime() + seconds * 1000;
        var newkpdate = new Date(newkptime);
        $("#kaipan_" + i).val(TimeFormat(newkpdate));
        
        //封盘+
        var oldfptime = $("#fengpan_" + i).val();
        var oldfpdate = new Date("2012/01/01 " + oldfptime);
        var newfptime = oldfpdate.getTime() + seconds * 1000;
        var newfpdate = new Date(newfptime);
        $("#fengpan_" + i).val(TimeFormat(newfpdate));
        
        //开奖+
        var oldkjtime = $("#kaijiang_" + i).val();
        var oldkjdate = new Date("2012/01/01 " + oldkjtime);
        var newkjtime = oldkjdate.getTime() + seconds * 1000;
        var newkjdate = new Date(newkjtime);
        $("#kaijiang_" + i).val(TimeFormat(newkjdate));
      }
      break;
  }
}

function TimeFormat(datetime)
{
  var hours = datetime.getHours();
  hours = hours < 10 ? "0" + hours : hours;
  var minutes = datetime.getMinutes();
  minutes = minutes < 10 ? "0" + minutes : minutes;
  var seconds = datetime.getSeconds();
  seconds = seconds < 10 ? "0" + seconds : seconds;
  
  return hours + ":" + minutes + ":" + seconds;
}
</script>
</body>
</html>